package com.gaohe.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gaohe.mapper.CommentMapper;
import com.gaohe.pojo.Comment;
import com.gaohe.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpl extends ServiceImpl<CommentMapper, Comment> implements CommentService {
    @Autowired
    private CommentMapper commentMapper;
    //根据用户 id 查看评论
    @Override
    public List<Comment> getCommentsByShopId(Long shopId) {
        List<Comment> commentList = commentMapper.getCommentsByShopId(shopId);
        return commentList;
    }
}
